MYSQL = {
    "host": "localhost",
    "user": "root",
    "password": "123456",
    "database": "lianjia",
    "charset": "utf8",
}

SEM = 10     # 限制协程请求并发数，限制速度或与代理IP并发上限相同

CITY_TABLE = "citys"
ROOM_TABLE = "rooms"

# 表格中数据状态码
STATUS_NOT_CRAWL = 0  # 未抓取
STATUS_CRAWLING = 1  # 抓取中
STATUS_CRAWL_SUCCEED = 2  # 抓取成功
STATUS_CRAWL_FAILED = -1  # 抓取失败
STATUS_CRAWL_NONE = -2  # 抓取数据为空

# 函数返回码
FUNC_CODE_NONE = 0  # 空值
FUNC_CODE_ERROR = -1  # 报错
FUNC_CODE_OTHER = -2  # 其他情况

# retry次数和时间配置
STOP_MAX_ATTEMPT_NUMBER = 2  # 抓取最大尝试次数
WAIT_RANDOM_MIN = 100  # 随机等待最小时间（毫秒）
WAIT_RANDOM_MAX = 1000  # 随机等待最大时间（毫秒）

USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36"